
FROM openjdk:8-jdk-alpine

RUN apk add --update font-adobe-100dpi ttf-dejavu fontconfig   #解决不显示图形验证码

VOLUME /tmp

ENV NACOS_SERVER_ADDR=123.249.81.193:8848

ENV SPRING_PROFILES_ACTIVE=prod

ADD blog4j-*.jar app.jar

ENTRYPOINT ["java","-Djava.security.egd=file:/dev/./urandom","-jar", \
    "-Dspring.cloud.nacos.discovery.serverAddr=${NACOS_SERVER_ADDR}", \
    "-Dspring.cloud.nacos.config.serverAddr=${NACOS_SERVER_ADDR}", \
    "-Dspring.profiles.active=${SPRING_PROFILES_ACTIVE}", "/app.jar"]